// 用户相关类型
export interface User {
  id: number;
  userId: string;
  username: string;
  realName: string;
  phone: string;
  email: string;
  avatar: string;
  status: number;
  createTime: string;
  updateTime: string;
}

export interface UserLoginDTO {
  phone: string;
  password: string;
  captcha?: string;
  remember?: boolean;
  systemId?: string;
  device?: string;
}

export interface UserRegisterDTO {
  phone: string;
  email: string;
  password: string;
  username?: string;
  realName?: string;
  captcha?: string;
}

export interface UserLoginVO {
  userId: string;
  username: string;
  phone: string;
  realName: string;
  email: string;
  roleList: string[];
  permissionList: string[];
}

export interface UserPageDTO {
  currentPage: number;
  pageSize: number;
  username?: string;
  realName?: string;
  phone?: string;
  email?: string;
  status?: number;
}

export interface UserSaveDTO {
  username: string;
  password: string;
  realName?: string;
  phone: string;
  email?: string;
  avatar?: string;
  status?: number;
}

export interface UserUpdDTO {
  id: number;
  username: string;
  password?: string;
  realName?: string;
  phone?: string;
  email?: string;
  avatar?: string;
  status?: number;
}

// 角色相关类型
export interface Role {
  id: number;
  systemId: string;
  roleId: string;
  name: string;
  description: string;
  status: number;
  type: number;
  createTime: string;
  updateTime: string;
}

export interface RolePageDTO {
  currentPage: number;
  pageSize: number;
  systemId?: string;
  roleId?: string;
  name?: string;
  status?: number;
  type?: number;
}

export interface RoleSaveDTO {
  systemId: string;
  roleId: string;
  name: string;
  description?: string;
  status?: number;
  type: number;
}

export interface RoleUpdDTO {
  id: number;
  systemId?: string;
  roleId?: string;
  name?: string;
  description?: string;
  status?: number;
  type?: number;
}

// 资源相关类型
export interface Resource {
  id: number;
  systemId: string;
  name: string;
  type: number;
  permission: string;
  parentId?: number;
  url?: string;
  icon?: string;
  sortOrder: number;
  status: number;
  createTime: string;
  updateTime: string;
}

export interface ResourcePageDTO {
  currentPage: number;
  pageSize: number;
  systemId?: string;
  name?: string;
  type?: number;
  status?: number;
}

export interface ResourceSaveDTO {
  systemId: string;
  name: string;
  type: number;
  permission: string;
  parentId?: number;
  url?: string;
  icon?: string;
  sortOrder: number;
  status?: number;
}

export interface ResourceUpdDTO extends ResourceSaveDTO {
  id: number;
}

// 系统相关类型
export interface System {
  id: number;
  systemId: string;
  systemName: string;
  description: string;
  status: number;
  createTime: string;
  updateTime: string;
}

export interface SystemPageDTO {
  currentPage: number;
  pageSize: number;
  systemId?: string;
  systemName?: string;
  status?: number;
}

export interface SystemSaveDTO {
  systemId: string;
  systemName: string;
  description?: string;
  status?: number;
}

export interface SystemUpdDTO {
  id: number;
  systemName?: string;
  description?: string;
  status?: number;
}

// 分页相关类型
export interface Page<T> {
  records: T[];
  total: number;
  size: number;
  current: number;
  pages: number;
}

// 基础响应类型
export interface BaseResponse<T> {
  code: number;
  msg: string;
  data: T;
  success: boolean;
}
